package file;

import java.io.File;
import java.io.FileFilter;

public class Test1 {
    public static void main(String[] args) {
        File dir=new File(".");
        if (dir.isDirectory()){
           /*File[]subs=dir.listFiles(new FileFilter() {
               public boolean accept(File pathname) {
                   return pathname.getName().contains("s");
               }
           });
            */
            File[]subs=dir.listFiles(file->file.getName().contains("s"));
           for (File sub:subs){
               System.out.println(sub.getName());
           }
        }
    }
}
